package com.zl.study.mybatis.demo.entity;

import org.apache.ibatis.domain.blog.*;
import org.apache.ibatis.domain.blog.Author;
import org.apache.ibatis.domain.blog.Blog;

import java.util.Date;
import java.util.List;

public class Post {
  private int id;
  private Author author;
  private Blog blog;
  private Date createdOn;
  private Section section;
  private String subject;
  private String body;
  private List<Comment> comments;
  private List<Tag> tags;

  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }

  public Author getAuthor() {
    return author;
  }

  public void setAuthor(Author author) {
    this.author = author;
  }

  public Blog getBlog() {
    return blog;
  }

  public void setBlog(Blog blog) {
    this.blog = blog;
  }

  public Date getCreatedOn() {
    return createdOn;
  }

  public void setCreatedOn(Date createdOn) {
    this.createdOn = createdOn;
  }

  public Section getSection() {
    return section;
  }

  public void setSection(Section section) {
    this.section = section;
  }

  public String getSubject() {
    return subject;
  }

  public void setSubject(String subject) {
    this.subject = subject;
  }

  public String getBody() {
    return body;
  }

  public void setBody(String body) {
    this.body = body;
  }

  public List<Comment> getComments() {
    return comments;
  }

  public void setComments(List<Comment> comments) {
    this.comments = comments;
  }

  public List<Tag> getTags() {
    return tags;
  }

  public void setTags(List<Tag> tags) {
    this.tags = tags;
  }

  @Override
  public String toString() {
    return "Post: " + id + ":" + subject + ":" + body + " : " + createdOn + "(" + author + ")(" + blog + ")";
  }
}
